package lxt.service;

import java.util.Date;
import java.util.List;
import java.util.Map;
import lxt.entity.ChargeRecord;


public interface ChargeRecordService {
	/**
	 * 加载运费信息
	 * 
	 * @param endDate
	 * @return
	 */
	public List<Map<String, Object>> loadCharge(String orderId,
			String clientName, String startDate, String endDate,
			Integer offset, Integer length) throws Exception;

	/**
	 * 添加运费
	 */
	public boolean addCharge(ChargeRecord charge) throws Exception;

	/**
	 * 根据id查找运费
	 */
	public ChargeRecord loadChargeById(String chargeId) throws Exception;

	/**
	 * 修改运费
	 */
	public boolean updateCharge(ChargeRecord charge) throws Exception;

	/**
	 * 删除运费
	 */
	public boolean deleteCharge(String chargeId) throws Exception;

	/**
	 * 查询欠费订单
	 * 
	 * @param clientId
	 * @param endDate
	 * @param startDate
	 * @param offset
	 * @param pageSize
	 * @return
	 */
	public List<?> loadByPageWithClient(String clientId,
			Date startDate, Date endDate, Integer offset, Integer pageSize)
			throws Exception;

	/**
	 * 在此次缴费之后的缴费次数
	 * @param clientInfo
	 * @param invoiceOrder
	 * @return
	 */
	public int countLast(ChargeRecord chargeRecord) throws Exception;

	/**
	 * 查询更新页面的数据
	 * @param chargeRecord
	 * @return
	 * @throws Exception
	 */
	public List<?> queryResumeForUpdatePre(ChargeRecord chargeRecord) throws Exception;
	/**
	 * 根据订单id和客户id查询nextChargeDate
	 * @param orderId
	 * @param clientId
	 * @return
	 */
	public ChargeRecord queryByNextChargeDate(String orderId,String clientId)throws Exception;

}
